Services are the silent workers of your operating system. 👷â€â™‚ï¸
A Service is essentially a process that runs in the background, often starting automatically at boot.
| Feature | Service ðŸ› ï¸ | Process 🃠|
|---|---|---|
| Start | Automatic or Manual | Manual (User) |
| Mode | Background (Daemon) | Foreground (mostly) |
| Lifespan | Long-running | Often short-lived |
| Example | ssh, apache2 |
ls, cd, cat |
Note: In Kali,
systemdis the manager that controls these services.
Manage your services using systemctl.
systemctl status ssh
Look for Active: active (running) to confirm it's working.
sudo systemctl start ssh
Starts the service immediately.
sudo systemctl stop ssh
Stops the service immediately.
sudo systemctl enable ssh
Ensures the service starts automatically when you turn on the computer.
sudo systemctl disable ssh
Prevents the service from starting automatically.
sudo systemctl restart ssh
Stops and then starts the service (useful for applying config changes).
systemctl --type=service --state=running
Understanding services is critical for security:
root, compromising it gives the attacker full control. 👻